<?php
namespace app\admin\model;

use think\Model;
use traits\model\SoftDelete;

class Carousel extends Model
 {

    protected $autoWriteTimestamp = true;

    use SoftDelete;

    protected $deleteTime = 'delete_time';
    
    public function findInfo($where = '',$field = '*') {
        $res = $this->where($where)->field($field)->find();
        return empty($res)?array():$res->toArray();
    }

    public function selectInfo($where = '', $sort = 'create_time desc',$field = '*') {
        return $this->where($where)->field($field)->order($sort)->paginate('', false, page_param());
    }
    
    
    

}
